
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>{$Think.config.site.title} - 支付设置</title>

    <meta name="keywords" content="{$Think.config.site.keywords}">
    <meta name="description" content="{$Think.config.site.description}">

    <link rel="shortcut icon" href="favicon.ico"> <link href="{$Think.config.site.resource_url}css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/animate.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/ionRangeSlider/ion.rangeSlider.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/awesome-bootstrap-checkbox/awesome-bootstrap-checkbox.css" rel="stylesheet">
    <link href="{$Think.config.site.resource_url}css/plugins/clockpicker/clockpicker.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="{$Think.config.site.resource_url}css/plugins/markdown/bootstrap-markdown.min.css" />
    <!-- 文件上传样式 -->
    <link rel="stylesheet" type="text/css" href="{$Think.config.site.resource_url}css/plugins/webuploader/webuploader.css">
    <link rel="stylesheet" type="text/css" href="{$Think.config.site.resource_url}css/demo/webuploader-demo.css">

    <link href="{$Think.config.site.resource_url}css/style.css?v=4.1.0" rel="stylesheet">

    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui@2.4.4/lib/theme-chalk/index.css">
    <!-- import Vue before Element -->
    <script src="{$Think.config.site.resource_url}js/assets/vue.js"></script>
    <!-- import JavaScript -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

</head>

<body class="gray-bg">
<style>
    .el-upload__input{
        display: none !important;
    }
</style>
    <div class="wrapper wrapper-content animated fadeIn">
        <div class="row">
            <div class="col-sm-12">
                <div class="tabs-container">
                    <ul class="nav nav-tabs">
                        <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true">{:lang('微信商户设置')}</a>
                        </li>
                        <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">{:lang('支付宝支付设置')}</a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div id="tab-1" class="tab-pane active">
                            <div class="panel-body" id="app">
                                <form class="form-horizontal m-t" id="commentForm" method="post" enctype="multipart/form-data" action="<?php echo \think\Request::instance()->root(); ?>/ausadmin/Jysetting/paysetting" >
                                    <div class="form-group">
                                        <input type="hidden" name="id" value="{$info.id|default=''}">
                                        <label class="col-sm-3 control-label">{:lang('商户号')}：</label>
                                        <div class="col-sm-8">
                                            <input  name="mchid" minlength="2" type="text" value="{$info.mchid|default=''}" class="form-control" required="" aria-required="true" maxlength="20">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">{:lang('商户key')}：</label>
                                        <div class="col-sm-8">
                                            <input  name="mchkey" minlength="2" type="text" value="{$info.mchkey|default=''}" class="form-control" required="" aria-required="true" maxlength="40">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">{:lang('小程序appKey')}：</label>
                                        <div class="col-sm-8">
                                            <input  name="app_key" minlength="2" type="text" value="{$info.app_key|default=''}" class="form-control" required="" aria-required="true" maxlength="40">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">SSLCERT_PATH：</label>
                                        <div class="col-sm-8" >
                                            <el-upload name="sslcert" value="cert_file" class="upload-demo" action="/ausadmin/Jysetting/file_upload?name=sslcert" :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSuccess" :file-list="cert_file" :on-error="handleError" :limit="2" >
                                                <el-button size="small" type="primary" class="fl">点击上传</el-button>
                                            </el-upload>
                                            <input type="hidden" id="ssl_cert" name="sslcert_path" value="{$info.sslcert_path|default=''}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">SSLKEY_PATH：</label>
                                        <div class="col-sm-8">
                                                <el-upload name="sslkey" value="ssl_file" class="upload-demo" action="/ausadmin/Jysetting/file_upload?name=sslkey" :on-preview="handlePreview" :on-remove="handleRemove" :on-success="handleSuccess" :file-list="key_file" :on-error="handleError" :limit="2" >
                                                    <el-button size="small" type="primary" class="fl">点击上传</el-button>
                                                </el-upload>
                                            <input type="hidden" id="ssl_key" name="sslkey_path" value="{$info.sslkey_path|default=''}">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <div class="col-sm-offset-3 col-sm-8">
                                            <button class="btn btn-primary" type="submit">{:lang('提交')}</button>
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div id="tab-2" class="tab-pane">
                            <div class="panel-body">
                                <!--<form class="form-horizontal m-t" id="commentForm">-->
                                    <!-- <div class="form-group">
                                        <label class="col-sm-3 control-label">商户号：</label>
                                        <div class="col-sm-8">
                                            <input id="cname" name="name" minlength="2" type="text" class="form-control" required="" aria-required="true">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">商户key：</label>
                                        <div class="col-sm-8">
                                            <input id="cname" name="name" minlength="2" type="text" class="form-control" required="" aria-required="true">
                                        </div>
                                    </div>
                                    <div class="form-group">
                                        <label class="col-sm-3 control-label">是否是子商户：</label>
                                        <div class="col-sm-8">
                                           <div class="radio radio-info radio-inline">
                                                <input type="radio" id="inlineRadio1" value="1" name="billingunit" >
                                                <label for="inlineRadio1"> 是 </label>
                                            </div>
                                            <div class="radio radio-inline">
                                                <input type="radio" id="inlineRadio2" value="2" name="billingunit">
                                                <label for="inlineRadio2"> 否 </label>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="form-group">
                                            <label class="col-sm-3 control-label">密钥文件：</label>
                                            <div class="col-sm-8">
                                                <input id="cname" name="name" minlength="2" type="file" class="file" >
                                            </div>
                                    </div>
                                    <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-8">
                                    <button class="btn btn-primary" type="submit">提 交</button>
                                </div>
                            </div> <-->
                                <h3>{:lang('暂未开放该接口')}</h3>
                                <!--</form>-->
                            </div>
                        </div>
                    </div>


                </div>
            </div>
    </div>

        <script>
            var Main = {
                data() {
                    return {
                        cert_file:{$info.vue_cert},
                        key_file:{$info.vue_key}
                    };
                },
                methods: {
                    handleRemove(file, fileList) {
                        console.log(file, fileList);
                    },
                    handlePreview(file) {
                        console.log(file);
                    },
                    handleSuccess(response, file, fileList) {
                        var name = response.name;
                        var file = response.file;
                        if (name == 'sslkey') {
                            this.key_file = [{name:file}];
                        } else {
                            this.cert_file = [{name:file}];
                        }
                        name = name+'_path';
                        $('input[name='+name+']').val(file);
                    },
                    handleError(err, file, fileList) {
                        console.log(err)
                    }
                }
            }

            var Ctor = Vue.extend(Main)
            new Ctor().$mount('#app')

        </script>
    <!-- 全局js -->
   <!-- 全局js -->
    <script src="{$Think.config.site.resource_url}js/jquery.min.js?v=2.1.4"></script>
    <script src="{$Think.config.site.resource_url}js/bootstrap.min.js?v=3.3.6"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="{$Think.config.site.resource_url}js/plugins/layer/layer.min.js"></script>

    <script src="{$Think.config.site.resource_url}js/plugins/prettyfile/bootstrap-prettyfile.js"></script>
    <!-- 自定义js -->
    <script src="{$Think.config.site.resource_url}js/content.js?v=1.0.0"></script>
    <!-- Chosen -->
    <script src="{$Think.config.site.resource_url}js/plugins/chosen/chosen.jquery.js"></script>
    
    


</body>

</html>
